package com.api.shopapi.service.impl;

import com.api.shopapi.entity.Dishes;
import com.api.shopapi.mapper.DishesMapper;
import com.api.shopapi.service.DishesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("DishesServiceImplOne")
public class DishesServiceImplOne implements DishesService {

    @Autowired
    private DishesMapper dishesMapper;

    @Override
    public
    int insert(Dishes dishes){
        return dishesMapper.insert(dishes);
    }

    @Override
    public
    int update(Dishes dishes){
        return dishesMapper.update(dishes);
    }

    @Override
    public
    Dishes getByDishesCode(String dishesCode){
        return dishesMapper.getByDishesCode(dishesCode);
    }

    @Override
    public
    List<Dishes> ListByCarePlaceCode(String carePlaceCode){
        return dishesMapper.ListByCarePlaceCode(carePlaceCode);
    }

}
